import { Component, OnInit, Inject, forwardRef, ViewChild } from '@angular/core';
import { ActivityGoodsManagementGridComponent } from './activity-goods-management-grid/activity-goods-management-grid.component'

import { masterService } from '../../../../lib/master.service';

@Component({
    selector: 'app-activity-goods-management',
    templateUrl: './activity-goods-management.component.html',
    styleUrls: ['./activity-goods-management.component.css']
})
export class ActivityGoodsManagementComponent implements OnInit {
    @ViewChild('ActivityGoodsGrid') ActivityGoodsGrid: ActivityGoodsManagementGridComponent;
    public filter: any = {
        goodsName: '',
        pageSize: '10',
        pageIndex: '1'
    }
    constructor(private _masterService: masterService) { }

    ngOnInit() {
    }

    // 过滤grid数据
    selectListItem() {
        this.ActivityGoodsGrid.onChangeTable(this.filter, '1');
    }

    openModal() {
        this._masterService.openActivity.emit();
    }
}
